import Layout from '@/views/layout.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'
import Detail from '@/views/detail.vue'
import Collection from '@/views/collection.vue'
import Hire from '@/views/hire.vue'
import Release from '@/views/release.vue'
import Cities from '@/views/cities.vue'
import Search from '@/views/search.vue'
import MapFind from '@/views/mapFind.vue'

import Home from '@/views/secondes/home.vue'
import Find from '@/views/secondes/find.vue'
import Consultation from '@/views/secondes/consultation.vue'
import Mine from '@/views/secondes/mine.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/home',
    children: [
      {
        path: 'home',
        component: Home
      },
      {
        path: 'find',
        component: Find
      },
      {
        path: 'consultation',
        component: Consultation
      },
      {
        path: 'mine',
        component: Mine
      }
    ]
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/register',
    component: Register
  },
  {
    path: '/detail',
    component: Detail
  },
  {
    path: '/collection',
    component: Collection
  },
  {
    path: '/hire',
    component: Hire
  },
  {
    path: '/release',
    component: Release
  },
  {
    path: '/cities',
    component: Cities
  },
  {
    path: '/search',
    component: Search
  },
  {
    path: '/mapFind',
    component: MapFind
  }
]

export default routes
